#include "widget.h"
#include "ui_widget.h"
#include <QDebug>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    ui->rbtnMan->setChecked(true);

    connect(ui->rbtnWoman, &QRadioButton::clicked, this, [=](){
        qDebug()<<"女："<< ui->rbtnWoman->isChecked()<<endl;
    });

    connect(ui->cBox, &QCheckBox::stateChanged, this , [=](int state){
        qDebug()<< "老板人好："<<  state<<endl;
    });

//    QListWidgetItem * item = new QListWidgetItem("锄禾日当午");
//    ui->listWidget->addItem(item);
//    item->setTextAlignment(Qt::AlignHCenter);

    // QStringList Qlist<QString>
    QStringList list;
    list << "锄和日当午"<< "汗滴禾下土";
    ui->listWidget->addItems(list);
}

Widget::~Widget()
{
    delete ui;
}

